import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class UserService {
  url = {
    userList: '/gameUser/list',
    growthList: '/gameUser/growthList', // 成长值明细
    integralList: '/gameUser/integralList', // 积分值明细
  };

  constructor(
    private httpClient: HttpClient
  ) {
  }

  getUserList(body: any) {
    return this.httpClient.post(this.url.userList, body).toPromise();
  }

  getGrowthList(body: any) {
    return this.httpClient.post(this.url.growthList, body).toPromise();
  }

  getIntegralList(body: any) {
    return this.httpClient.post(this.url.integralList, body).toPromise();
  }
}
